/* GUI CONVERTED from eciq04.p (converter v1.75) Mon Aug 14 12:26:48 2000 */
/* eciq04.p - ECN APPROVALS AND TRAILER                                 */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* web convert eciq04.p (converter v1.00) Mon Oct 06 14:21:50 1997 */
/* web tag in eciq04.p (converter v1.00) Mon Oct 06 14:18:04 1997 */
/*F0PN*/ /*K0M5*/ /*                                                    */
/*V8:ConvertMode=Report                                        */
/* REVISION: 7.4      LAST MODIFIED: 10/11/93   BY: pma *H013*          */
/* REVISION: 7.4      LAST MODIFIED: 10/13/95   BY: ame *H0GF*          */
/* REVISION: 8.5      LAST MODIFIED: 11/29/96   BY: *J16W*  Russ Witt     */
/* REVISION: 8.6      LAST MODIFIED: 06/10/96   BY: Mariya Kutwal *K00C*  */
/* REVISION: 8.6      LAST MODIFIED: 10/07/97   BY: mzv *K0M5*          */
/* REVISION: 8.6      LAST MODIFIED: 05/29/98   BY: *K1R7*  A.Shobha    */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/14/00 BY: *N0KW* Jacolyn Neder    */

/*K00C* Change all references to ecd9_det to rsu_mstr and rsud_det
 *K00C*/


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

/*H0GF*/ {mfdeclre.i}
{gplabel.i} /* EXTERNAL LABEL INCLUDE */
/*K1R7 /*K0M5*/ {wbrp02.i}*/

     {ecmtparm.i}

     define variable ecd1par like ecd1_par no-undo.
     define variable ecd1comp like ecd1_comp no-undo.
     define variable ecd1ref  like ecd1_ref no-undo.
     define variable ecd9qad03 like eca_reroute.
     define variable reroute   like mfc_logical.
     define new shared variable apprgroup like eca_group.
/*J16W*  define variable cmmt like mfc_logical initial no label "Comments".  */
     define variable closed_yn like mfc_logical.
     define variable ecmnbrto like ecm_nbr_to.
     define shared variable yn like mfc_logical.
     define variable true1 like mfc_logical initial yes.
     define variable false1 like mfc_logical initial no.

/*H0GF*/ /*{mfdeclre.i}*/

/* DISPLAY SELECTION FORM */
     FORM /*GUI*/ 
/*J16W*     {ecform08.i}         */
/*J16W*/    {ecform14.i}
     with STREAM-IO /*GUI*/  frame form08 width 80 attr-space down.

     /* SET EXTERNAL LABELS */
     setFrameLabels(frame form08:handle).

     FORM /*GUI*/ 
        {ecform07.i}
     with STREAM-IO /*GUI*/  frame form07 attr-space side-labels width 80.

     /* SET EXTERNAL LABELS */
     setFrameLabels(frame form07:handle).

     find ecm_mstr where recid(ecm_mstr) = ecm_recid no-lock no-error.
     if not available (ecm_mstr) then return.

/*K00C**   if can-find (first ecd9_det where ecd9_nbr = ecm_nbr) then page.  */
/*K00C*/  if can-find (first rsu_mstr where rsu_doc_nbr = ecm_nbr) then page.

/*K00C** for each ecd9_det no-lock where ecd9_nbr = ecm_nbr
 *       by ecd9_seq with frame form08:
 *           display  ecd9_group @ apprgroup
 *                    ecd9_seq
 *                    integer(ecd9__qad03) @ ecd9qad03
 *                    true1 when (ecd9__qad04 = "R") @ reroute
 *                    false1 when (ecd9__qad04 <> "R") @ reroute
 *                    ecd9_approved ecd9__qad05 ecd9_appr_date
 * /*J16W*               "" @ cmmt   */
 *K00C*/ for each rsu_mstr no-lock where rsu_doc_nbr = ecm_nbr,
/*K00C*/ each rsud_det where rsud_index = rsu_index
/*K00C*/ by rsud_sequence with frame form08:
/*K00C*/     display  rsud_group @ apprgroup
/*K00C*/              rsud_sequence
/*K00C*/              rsud_svrty_lvl @ ecd9qad03
/*K00C*/              true1 when (rsud_canreroute) @ reroute
/*K00C*/              false1 when (not rsud_canreroute) @ reroute
/*K00C*/              rsud_approved rsud_approverid rsud_appr_date
         with frame form08 STREAM-IO /*GUI*/ .
         down.
         
/*GUI*/ {mfguichk.i  &warn=false} /*Replace mfrpchk*/

     end.

     /*ECN TRAILER*/
     do on error undo, leave with frame form07:
        if ecm_close_date <> ? then closed_yn = yes.
        ecmnbrto = ecm_nbr_to.
        display {ecform07.i} WITH STREAM-IO /*GUI*/ .
     end.

     
/*GUI*/ {mfguichk.i  &warn=false} /*Replace mfrpchk*/

     yn = yes.

/*H0GF*/ hide frame form07.
/*K1R7 /*K0M5*/ {wbrp04.i}*/
